package com.sanbi.erp.db.service;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.sanbi.erp.db.domain.ProductGroup;
import com.sanbi.erp.db.dao.ProductGroupMapper;

import java.util.List;

@Service
public class ProductGroupService {

    @Resource
    private ProductGroupMapper productGroupMapper;


    public int deleteByPrimaryKey(Integer id) {
        return productGroupMapper.deleteByPrimaryKey(id);
    }


    public int insert(ProductGroup record) {
        return productGroupMapper.insert(record);
    }


    public int insertSelective(ProductGroup record) {
        return productGroupMapper.insertSelective(record);
    }

    /**
     * 批量添加
     * @param productGroupList
     * @return
     */
    public int insertSelectiveList(List<ProductGroup> productGroupList) {
        return productGroupMapper.insertSelectiveList(productGroupList);
    }


    public ProductGroup selectByPrimaryKey(Integer id) {
        return productGroupMapper.selectByPrimaryKey(id);
    }

    public List<ProductGroup> selectByPrimaryKeyList(Integer productId) {
        return productGroupMapper.selectByPrimaryKeyList(productId);
    }


    public int updateByPrimaryKeySelective(ProductGroup record) {
        return productGroupMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKeySelectiveList(List<ProductGroup> list) {
        return productGroupMapper.updateByPrimaryKeySelectiveList(list);
    }


    public int updateByPrimaryKey(ProductGroup record) {
        return productGroupMapper.updateByPrimaryKey(record);
    }

}



